<div class="main-container col1-layout">
	<div class="container">
		<div class="row">
			<div class="col-xs-12">
				<div class="main">
					<div class="col-main">
						<div class="padding-s">
							<div class="account-create">
								<div class="page-title">
									<h1>
										Đăng ký thành viên
									</h1>
								</div>
                                <?php
                                	if(isset($status)&&$status=='success'){
                                ?>
                                <ul class="messages">
        						  <li class="success-msg">
            						<ul>
                						<li>
                    						<span>
                    						  Đăng ký thành viên thành công. Vui lòng kiểm tra email và kích hoạt tài khoản.
                    						</span>
                						</li>
            						</ul>
        						  </li>
        						</ul>
                                <?php
                                	}
                                ?>
								<?php $form=$this->beginWidget('CActiveForm', array(
                                	'id'=>'form-validate',
                                	'enableClientValidation'=>true,
                                	'clientOptions'=>array(
                                		'validateOnSubmit'=>true,
                                	),
                                    'htmlOptions'=>array(
                                        
                                    ),
                                )); ?>
									<div class="fieldset">
										<input type="hidden" name="success_url" value=""/>
										<input type="hidden" name="error_url" value=""/>
										<h2 class="legend">
											Thông tin cá nhân
										</h2>
										<ul class="form-list">
											<li class="fields">
												<div class="customer-name">
													<div class="field name-firstname">
														<label for="firstname" class="required">
															<em>
																*
															</em>
															Tên
														</label>
														<div class="input-box">
															<?php echo $form->textField($model,'firstname',array('id'=>'firstname','class'=>'input-text required-entry','title'=>'Tên','maxlength'=>6)); ?>
                                                            <?php echo $form->error($model,'firstname'); ?>
														</div>
													</div>
													<div class="field name-lastname">
														<label for="lastname" class="required">
															<em>
																*
															</em>
															Họ đệm
														</label>
														<div class="input-box">
                                                            <?php echo $form->textField($model,'lastname',array('id'=>'lastname','class'=>'input-text required-entry','title'=>'Họ đệm','maxlength'=>16)); ?>
                                                            <?php echo $form->error($model,'lastname'); ?>
														</div>
													</div>
												</div>
											</li>
											<li>
												<label for="email_address" class="required">
													<em>
														*
													</em>
													Email
												</label>
												<div class="input-box">
                                                    <?php echo $form->textField($model,'email',array('id'=>'email_address','class'=>'input-text validate-email required-entry','title'=>'Email')); ?>
                                                    <?php echo $form->error($model,'email'); ?>
												</div>
											</li>
											<li class="control">
												<input type="checkbox" name="is_subscribed" title="Đăng ký nhận bản tin" id="is_subscribed" class="checkbox" checked="checked"/>
												<label for="is_subscribed">
													Đăng ký nhận bản tin
												</label>
											</li>
										</ul>
									</div>
									<div class="fieldset">
										<h2 class="legend">
											Mật khẩu đăng nhập
										</h2>
										<ul class="form-list">
											<li class="fields">
												<div class="field">
													<label for="password" class="required">
														<em>
															*
														</em>
														Mật khẩu
													</label>
													<div class="input-box">
                                                        <?php echo $form->passwordField($model,'new_password',array('id'=>'pass','class'=>'input-text required-entry validate-password','title'=>'Mật khẩu')); ?>
	                                                    <?php echo $form->error($model,'new_password'); ?>
													</div>
												</div>
												<div class="field">
													<label for="confirmation" class="required">
														<em>
															*
														</em>
														Xác nhận mật khẩu
													</label>
													<div class="input-box">
                                                        <?php echo $form->passwordField($model,'repeat_password',array('id'=>'confirmation','class'=>'input-text required-entry validate-cpassword','title'=>'Xác Nhận Mật khẩu')); ?>
	                                                    <?php echo $form->error($model,'repeat_password'); ?>
													</div>
												</div>
											</li>
										</ul>
										<div id="window-overlay" class="window-overlay" style="display:none;">
										</div>
										<div id="remember-me-popup" class="remember-me-popup" style="display:none;">
											<div class="remember-me-popup-head">
												<h3>
													What's this?
												</h3>
												<a href="#" class="remember-me-popup-close" title="Close">Close</a>
											</div>
											<div class="remember-me-popup-body">
												<p>
													Checking &quot;Remember Me&quot; will let you access your shopping cart on this computer when you are logged out
												</p>
												<div class="remember-me-popup-close-button a-right">
													<a href="#" class="remember-me-popup-close button" title="Close"><span>Close</span></a>
												</div>
											</div>
										</div>
										<script type="text/javascript">
											//<![CDATA[

											function toggleRememberMepopup(event) {
												if ($('remember-me-popup')) {
													var viewportHeight = document.viewport.getHeight(),
														docHeight = $$('body')[0].getHeight(),
														height = docHeight > viewportHeight ? docHeight : viewportHeight;
													$('remember-me-popup').toggle();
													$('window-overlay').setStyle({
														height: height + 'px'
													}).toggle();
												}
												Event.stop(event);
											}

											document.observe("dom:loaded", function() {
												new Insertion.Bottom($$('body')[0], $('window-overlay'));
												new Insertion.Bottom($$('body')[0], $('remember-me-popup'));

												$$('.remember-me-popup-close').each(function(element) {
													Event.observe(element, 'click', toggleRememberMepopup);
												})
												$$('#remember-me-box a').each(function(element) {
													Event.observe(element, 'click', toggleRememberMepopup);
												});
											});
											//]]>
											
										</script>
									</div>
									<div class="buttons-set">
										<p class="required">
											* Required Fields
										</p>
										<p class="back-link">
											<a href="<?php echo Yii::app()->createUrl('Browser/Login'); ?>" class="back-link"><small>&laquo; </small>Đăng nhập</a>
										</p>
										<button type="submit" title="Submit" class="button">
											<span>
												<span>
													Đăng ký
												</span>
											</span>
										</button>
									</div>
								<?php $this->endWidget(); ?>
								<script type="text/javascript">
									//<![CDATA[
									var dataForm = new VarienForm('form-validate', true);
									//]]>
									
								</script>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<?php Yii::app()->
	getClientScript()->registerCssFile(CSS_FOLDER.'cwidgets.css','all'); Yii::app()->getClientScript()->registerCssFile(CSS_FOLDER.'widgets.css','all'); ?>